<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../css/layui.css" media="all">
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/Leave.css">
    <title>请假</title>
</head>

<body>
    <div class="all">
        <div class="all1">
            <!-- 团标 -->
            <div class="Emblem">
                <img src="../images/xh.jpg" alt="" srcset="">
            </div>
            <!-- 导航栏 -->
            <ul id="folding-menu">
                <li><a href="index.html" id="index"><i></i>&nbsp;主页</a></li>
                <li><a href="Personal honor.html"><i></i>&nbsp;个人风采</a></li>
                <li><a href="Class honor.html"><i></i>&nbsp;班级风采</a></li>
                <li><a href="Price apply.html"><i></i>&nbsp;评优奖申请</a></li>
                <li><a href="Leave.html"><i></i>&nbsp;请假申请</a></li>
                <li><a href="Homework.html"><i></i>&nbsp;作业提交</a></li>
                <li><a href="Lesson.html"><i></i>&nbsp;课程信息</a></li>
                <li><a href="Set.html"><i></i>&nbsp;设置</a></li>
            </ul>
        </div>
        <!-- header -->
        <div class="header">
            <img src="../images/10140568.jpg"></img>
            <a id="honor" href="my honor.html"><i></i>我的风采</a>
            <a id="zl" href="Modify.html"><i></i>修改资料</a>
            <a id="back" href="login.html"><i></i>退出登录</a>
        </div>
        <!-- 请假条 -->
        <div class="leave">
            <p class="type1">
                <a>申请人姓名</a>
                <a><input type="text" id="sname"></a>
                <a>学院</a>
                <a>
                    <select name="modules" lay-verify="required" lay-search="" id="apartment">
                        <option value="">数学与信息学院</option>
                    </select>>
                </a>
                <!-- <a><input type="text" id="apartment"></a> -->
                <a>专业</a>
                <!-- <a><input type="text" id="major"></a> -->
                <a>
                    <select name="modules" lay-verify="required" lay-search="" id="major">
                        <option value="">选择专业</option>
                        <option value="1">数学与应用</option>
                        <option value="2">信息与计算科学</option>
                        <option value="3">信息与统计</option>
                        <option value="4">信息与管理</option>
                    </select>>
                </a>
            </p>
            <p class="type2">
                <a>联系方式</a>
                <a><input id="phone" type="text"></a>
                <a>年级</a>
                <a>
                    <select name="modules" lay-verify="required" lay-search="" id="grade">
                        <option value="">选择年级</option>
                        <option value="1">2016级</option>
                        <option value="2">2017级</option>
                        <option value="3">2018级</option>
                        <option value="4">2019级</option>
                    </select>>
                </a>
                <!-- <a><input type="text" id="grade"></a> -->
                <a>班级</a>
                <a>
                    <select name="modules" lay-verify="required" lay-search="" id="class">
                        <option value="">选择班级</option>
                        <option value="1">1班</option>
                        <option value="2">2班</option>
                        <option value="3">3班</option>
                        <option value="4">4班</option>
                        <option value="5">5班</option>
                        <option value="6">6班</option>
                        <option value="7">7班</option>
                        <option value="8">8班</option>
                        <option value="9">9班</option>
                        <option value="10">10班</option>
                        <option value="11">11班</option>
                        <option value="12">13班</option>
                    </select>>
                </a>
                <!-- <a><input id="class" type="text"></a> -->
            </p>
            <p class="type3">
                <a>请假事由</a>
                <a><textarea type="text" id="content"></textarea></a>
            </p>
            <p class="type4">
                <a>安全责任承诺及联系方式</th>
                <a><textarea type="text" id="opinion"></textarea>
                    
                </a>
            </p>
            <p class="type5">
                <a>班主任意见</th>
                <a><textarea type="text"></textarea></a>

            </p>
            <button onclick="getLeave()" class="layui-btn layui-btn-normal" style="position:absolute;left: 45%">提交保存</button>
        </div>
        <!-- 提交申请 -->


        <!-- footer -->
        <div id="footer">
            <div class="bottominfo">
                版权所有：西华师范大学 The Fighting 团队
                </br>
                Copyright 2018 10-2018 12 / 5000 China West Normal University The Fighting Team
            </div>
        </div>
    </div>
</body>
<script src="../layui/layui.js" charset="utf-8"></script>
<script src="https://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
<script src="../js/login.js"></script>
<script src="../js/leave.js"></script>

<script>
    console.log("loginsno");
    console.log(window.loginsno);
    console.log("loginsno");
    layui.use(['form', 'layedit', 'laydate'], function() {
        var form = layui.form,
            layer = layui.layer,
            layedit = layui.layedit,
            laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value) {
                if (value.length < 5) {
                    return '标题至少得5个字符啊';
                }
            },
            pass: [/(.+){6,12}$/, '密码必须6到12位'],
            content: function(value) {
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data) {
            layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data) {
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });




    });
</script>

</html>